﻿//JumbotCms_4.1 Final
using System;
using System.Data;
using System.Web;
using Jumbot.Common;
using JumbotCms.Common;
namespace JumbotCms.WebFile.Ajax
{
    public partial class _readtemplate : JumbotCms.API.FrontAjax
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckFormUrl())
            {
                Response.Write("提交有误");
                Response.End();
            }
            //防止网页后退--禁止缓存    
            Response.Expires = 0;
            Response.Buffer = true;
            Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
            Response.AddHeader("pragma", "no-cache");
            Response.CacheControl = "no-cache";
            string file = q("file");
            string templatetxt = Jumbot.Common.DirFile.ReadFile(site.Dir + "templates/_" + file);
            Response.Write(templatetxt);
        }
    }
}
